export default {
    curPath(state, path) {
        console.log('state :>> ', state);
        console.log('Path :>> ', path);
        return state.curPath
    },
    userInfoFul(state) {
        return state.userInfo[state.curUserId - 1]
    },
    userName(state, getters) {
        return getters.userInfoFul.name
    },
    userId(state, getters) {
        return getters.userInfoFul.id
    },
    userGender(state, getters) {
        return getters.userInfoFul.gender
    },
    userAge(state, getters) {
        return getters.userInfoFul.age
    },
    nowTime(state) {
        //输出时间格式为： YYYY/MM/DD HH24:MI:SS
        // console.log(value);
        let today = new Date()
        let y = today.getFullYear()
        let m = today.getMonth()
        let d = today.getDate()
        let hh = today.getHours()
        let mi = today.getMinutes()
        let ss = today.getSeconds()
        let newTime = y + "/" + m + "/" + d + " " + hh + ":" + mi + ":" + ss
        state.nowTime = newTime
            // console.log('state.nowTime :>> ', state.nowTime);
        return state.nowTime
    }
}